package com.junxonline.instant.dao.entity.model.log;

import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson.serializer.ToStringSerializer;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 系统接口调用日志表实体类
 *
 * @author JunX
 * @date 2022-05-11
 */
@Data
@TableName(value = "sys_log_api")
public class LogApi implements Serializable {

    /**
     * ID
     */
    @TableId(type = IdType.AUTO)
    @JSONField(serializeUsing = ToStringSerializer.class)
    private Long id;

    /**
     * 接口名称
     */
    @TableField(value = "name")
    private String name;

    /**
     * 接口类型
     */
    @TableField(value = "type")
    @JSONField(serializeUsing = ToStringSerializer.class)
    private Integer type;

    /**
     * 接口版本
     */
    @TableField(value = "version")
    private String version;

    /**
     * 请求URL
     */
    @TableField(value = "url")
    private String url;

    /**
     * Token
     */
    @TableField(value = "token")
    private String token;

    /**
     * 终端编号
     */
    @TableField(value = "terminal_code")
    private String terminalCode;

    /**
     * 终端IP
     */
    @TableField(value = "terminal_ip")
    private String terminalIp;

    /**
     * 目标系统IP
     */
    @TableField(value = "target_ip")
    private String targetIp;

    /**
     * 操作系统
     */
    @TableField(value = "os")
    private String os;

    /**
     * 请求结果
     */
    @TableField(value = "status")
    @JSONField(serializeUsing = ToStringSerializer.class)
    private Integer status;

    /**
     * 请求参数
     */
    @TableField(value = "params")
    private String params;

    /**
     * 请求时间
     */
    @TableField(value = "request_time")
    private Date requestTime;

}
